package dev.hitools.common.utils.download

import androidx.annotation.Keep
import com.arialyy.aria.core.Aria
import com.arialyy.aria.core.download.DownloadTaskListener
import com.arialyy.aria.core.task.DownloadTask
import java.lang.Exception

@Keep
open class InnerDownloadCallback : DownloadTaskListener {
    init {
        Aria.download(this).register()
    }

    fun destroy() {
        Aria.download(this).unRegister()
    }

    override fun onWait(task: DownloadTask) {
    }

    override fun onPre(task: DownloadTask) {
    }

    override fun onTaskPre(task: DownloadTask) {
    }

    override fun onTaskResume(task: DownloadTask) {
    }

    override fun onTaskStart(task: DownloadTask) {
    }

    override fun onTaskStop(task: DownloadTask) {
    }

    override fun onTaskCancel(task: DownloadTask) {
    }

    override fun onTaskFail(task: DownloadTask, e: Exception?) {
    }

    override fun onTaskComplete(task: DownloadTask) {
    }

    override fun onTaskRunning(task: DownloadTask) {
    }

    override fun onNoSupportBreakPoint(task: DownloadTask) {
    }
}